﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using com.creditos.config;
using com.creditos.bl.interfaces.liclUtil;
using com.creditos.be.liclUtil;
using System.ServiceModel;
using com.creditos.be.liclSolcred;
using com.creditos.bl.interfaces.liclSolcred;

namespace liclUtil
{
    public class liclUtilController
    {
        Config config = new Config();
        public liclUtilController()
        {

        }
        public List<ParametroBE> Listar(ParametroBE oParametroBE)
        {
            ChannelFactory<IParametroBL> factory = null;
            using (factory = new ChannelFactory<IParametroBL>(config.Context + "Parametro"))
            {
                IParametroBL oParm = factory.CreateChannel();
                List<ParametroBE> lst = oParm.Listar(oParametroBE);
                factory.Close();
                return lst;
            }
        }

        public void ActualizarEstadoSolicitud(SolicitudBE oSolicitud)
        {
            ChannelFactory<ISolicitudBL> factory = null;
            using (factory = new ChannelFactory<ISolicitudBL>(config.Context + "Solicitud"))
            {
                ISolicitudBL oParm = factory.CreateChannel();
                oParm.ActualizarEstadoSolicitud(oSolicitud);
                factory.Close();                
            }
        }

    }
}
